package com.xiaoyi.controller;

import com.xiaoyi.entity.RespBean;
import com.xiaoyi.service.OrderInfoService;
import com.xiaoyi.service.impl.OrderInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/takeOrder.do")
public class TakeOrderController extends HttpServlet {
    private OrderInfoService orderInfoSerive=new OrderInfoServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setHeader("Content-Type","text/html:charset=utf-8");
        resp.getWriter().write(orderInfoSerive.takeOrder(req));

    }
}
